using MediatR;
using TerritoryGame.Domain.ValueObjects;

namespace TerritoryGame.Application.Commands;

public record StartGameCommand : IRequest<StartGameResult>
{
    public Guid RoomId { get; init; }
    public Guid PlayerId { get; init; }
}

public record StartGameResult
{
    public bool Success { get; init; }
    public string? ErrorMessage { get; init; }
    public int GameDuration { get; init; }
    public List<PlayerInfo> Players { get; init; } = new();
}

public record PlayerInfo
{
    public Guid Id { get; init; }
    public string NickName { get; init; } = string.Empty;
    public PlayerColor Color { get; init; }
    public GameScore Score { get; init; }
    public int Area { get; init; } // 玩家占领的面积
    public bool IsOnline { get; init; }
}
